{extend name="base" /}

{block name="title"} 供应商管理 {/block}

{block name="body"}


<div class="col-lg-12">

    <section class="panel">
        <header class="panel-heading">  
            <span class="mg-r-md">条件筛选</span>
            <small class="pull-right">
                <a class="fa fa-chevron-down panel-collapsible pd-r-xs" href="javascript:;"></a>
            </small>
        </header>
        <div class="panel-body">
            <form class="form-inline form-search" role="form">

                <div class="form-group mg-t-xs">
                    <label>公司名称</label>
                    <input type="text" class="form-control" name="title" placeholder="公司名称">
                </div>
                
                <div class="form-group mg-t-xs">
                    <label>联系人</label>
                    <input type="text" class="form-control" name="contact" placeholder="联系人">
                </div>
                
                <div class="form-group mg-t-xs">
                    <label>邮箱</label>
                    <input type="email" class="form-control" name="email" placeholder="邮箱">
                </div>
                
                <div class="form-group mg-t-xs">
                    <label>手机</label>
                    <input type="text" class="form-control" name="phone" placeholder="手机">
                </div>

                <div class="form-group col-xs-12 col-md-12 mg-t-xs">
                    <button type="button" class="btn btn-success btn-sm col-xs-12 col-sm-2 col-md-1" onclick="Table.methods.refresh()">搜索</button>
                </div>

            </form>
        </div>

    </section>

    <section class="panel">
        <header class="panel-heading">列表</header>
        <div class="panel-body">
            <div class="table-responsive">
                <table class="table table-bordered table-striped" id="table"> </table>
            </div>
        </div>
    </section>



</div>

    <!-- comboSelect样式 -->
    <link href="/static/admin/vendor/comboSelect/combo.select.css" rel="stylesheet">

{/block}


<!-- js -->
{block name="js"}

<!-- <script src="/static/admin/js/distpicker.min.js"></script> -->

<script>
    // Table.layer = ["55%","85%"];
    Table.formatter.address = function(value, row, index){
        return row.province+'-'+row.city+'-'+row.district;
    }

    table_config.columns = [
        {
            checkbox: true,  
            visible: true,
            printIgnore: true,
            class: "hidden-xs"
        }, 
        {
            field: 'id',
            title: 'ID',
            sortable: true,
            titleTooltip: 'ID',
            printIgnore: true
        }, 
        {
            field: 'title',
            title: '客户名称',
            sortable: true,
            titleTooltip: '客户名称'
        },
        {
            field: 'contact',
            title: '联系人',
            sortable: true
        },
        {
            field: 'phone',
            title: '手机',
            sortable: true
        },
        {
            field: 'tel',
            title: '电话',
            sortable: true
        }, 
/*        {
            field: 'fax',
            title: '传真',
            sortable: true
        },  */      
        {
            field: 'email',
            title: '邮箱',
            sortable: true,
            class: "hidden-xs"
        }, 
/*        {
            field: 'credit_id',
            title: '社会信用代码',
            sortable: true,
            class: "hidden-xs hidden-sm"
        }, 
        {
            field: 'taxpayer_id',
            title: '纳税人识别号',
            sortable: true,
            class: "hidden-xs hidden-sm"
        }, 
        {
            field: 'bank',
            title: '开户行',
            sortable: true,
            class: "hidden-xs hidden-sm"
        }, 
        {
            field: 'bank_number',
            title: '开户行卡号',
            sortable: true,
            class: "hidden-xs hidden-sm"
        }, */
        {
            field: 'address',
            title: '地区',
            formatter: Table.formatter.address,
            printFormatter: Table.formatter.address,
            class: "hidden-xs"
        },
/*        {
            field: 'street',
            title: '街道地址',
            sortable: true,
            class: "hidden-xs hidden-sm hidden-md"
        },*/
        {
            field: 'create_time',
            title: '添加时间',
            sortable: true,
            formatter: Table.formatter.time,
            printFormatter: Table.formatter.time,
            class: "hidden-xs hidden-sm"
        },
        {
            title: '操作',
            formatter: Table.formatter.operate,
            printIgnore: true
        }
     ];

    // 导出表格名称
    table_config.exportOptions.tableName = table_config.exportOptions.fileName = "供应商列表";

    // 忽略导出列
    table_config.exportOptions.ignoreColumn = [0,-1];

    Table.table = $('#table').bootstrapTable(table_config);
</script>
{/block}